package ga.gene;


/**
 * The Class Input.
 */
public class Input {
	
	private Integer inputNum;
	private Boolean bool;
	
	/**
	 * Creating a null Input is not allowed
	 *
	 * @throws Exception the exception
	 */
	public Input() throws Exception{
		throw new Exception("Can't create null inputs");
	}
	
	/**
	 * Instantiates a new input using an int
	 *
	 * @param in the in
	 */
	public Input(int in){
		setNum(in);
		setBool(null);
	}
	
	/**
	 * Instantiates a new input using an int and boolean
	 *
	 * @param in the in
	 * @param boolIn the bool in
	 */
	public Input(int in, boolean boolIn){
		setNum(in);
		setBool(boolIn);
	}

	public Input(Input input) {
		setBool(input.getBool());
		setNum(input.getNum());
	}

	/**
	 * Gets the num.
	 *
	 * @return the num
	 */
	public int getNum() {
		return inputNum;
	}
	
	/**
	 * Sets the num.
	 *
	 * @param inputNum the new num
	 */
	public void setNum(int inputNum) {
		this.inputNum = inputNum;
	}
	
	/**
	 * Gets the bool.
	 *
	 * @return the bool
	 */
	public Boolean getBool() {
		return bool;
	}
	
	/**
	 * Sets the bool.
	 *
	 * @param bool the new bool
	 */
	public void setBool(Boolean bool) {
		this.bool = bool;
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString(){
		return inputNum.toString();
	}


}
